package org.rbac.dao;

import java.sql.Connection;

import javax.servlet.http.HttpServletRequest;
import javax.sql.DataSource;

import org.rbac.util.SpringUtil;
import org.springframework.context.support.ApplicationObjectSupport;

import com.kingschan.easyquery.sql.AbstractConnection;


public class QueryPlugsDao extends ApplicationObjectSupport implements AbstractConnection{

    public Connection getConnection(HttpServletRequest request) throws Exception {
        DataSource ds = (DataSource) SpringUtil.getBeanByName("RBAC_DataSource", request.getServletContext());
       // (DataSource) getApplicationContext().getBean("RBAC_DataSource");
        return ds.getConnection();
    }

}
